package com.niiwoo.civet.user.dto.response;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
@Getter
@Setter
public class FltUserAutoRegisterDto implements Serializable {

    private static final long serialVersionUID = -7117520891850414875L;
    public static final int SUCCESS_RET = 0;
    public static final String SUCCESS_RET_MSG = "操作成功。";
    public static final int FAIL_RET = -1;
    public static final String FAIL_RET_MSG = "操作失败。";
    public static final String ERROR_CODE_REGIST = "205";
    public static final int USER_EXIT = -2; //表示用户已存在


    //一般0代表成功
    private int ret;
    //错误信息
    private String message;
    //数据
    public Object data;

    private Exception exception;

    private String errorCode;

    public FltUserAutoRegisterDto(int ret,String message){
        this.ret = ret;
        this.message = message;
    }

    public boolean isSuccess(){
        return this.ret==SUCCESS_RET;
    }

    public boolean isFail() {
        return !isSuccess();
    }
}
